<template>
	<view class="wf-box">
		<HeadNav titleName="Binance(BSC)" :navBarHeight="navBarHeight"> </HeadNav>
		
		<view class="main">
			<view class="node-speed-wrap">
				<view class="speed-row">
					<view class="speed-tit">节点速度</view>
					<view class="speed-im im-fast">快</view>
					<view class="speed-im im-medium">中</view>
					<view class="speed-im im-slow">慢</view>
					<view class="speed-im im-nothing">慢</view>
				</view>
				<view class="speed-tip">区块高度：高度值越大，代表节点数据同步更完善，其稳 定性更好。在节点速度差不多的情况下，选择高度值大的 节点，体验更好。</view>
			</view>
			<view class="recomm-box">
				<view class="recomm-tit">推荐节点</view>
				<view class="recomm-scroll">
					<scroll-view scroll-y="true" class="scroll-Y">
						<view class="scroll-view-item" v-for="item in 4">
							<view class="recomm-status">
								<image src="../../static/img/chat-08.png"></image>
							</view>
							<view class="recomm-rt">
								<view class="f-row-up">
									<view>ninicoin1</view>
									<view>128ms</view>
								</view>
								<view class="f-row-down">
									<view>https://bsc-dataseed1.ninicoin.io</view>
									<view>区块高度 37155017</view>
								</view>
							</view>
						</view>
					</scroll-view>
				</view>
			</view>
			
			<view class="cut-box">
				<view class="cut-tit">自定义节点</view>
				<view class="cut-add" @click="openPopup">
					<view>
						<image src="../../static/img/me-58.png"></image>
						添加自定义节点
					</view>
				</view>
			</view>
			
		</view>
		
		<uni-popup ref="popup" type="center">
			<view class="popup-box">
				<view class="popup-title">添加自定义节点</view>
				<view class="popup-sub">
					<textarea placeholder="请输入节点名称">
						
					</textarea>
				</view>
				<view class="popup-footer">
					<view class="cancle" @click="closePopup()">取消</view>
					<view class="confim">确认</view>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	import HeadNav from "@/components/HeadNav"
	import navBarMixin from '@/mixin/navBarMixin.js'
	export default {
		data() {
			return {}
		},
		components: {
			HeadNav
		},
		mixins: [navBarMixin],
		methods: {
			openPopup() {
				this.$refs.popup.open()
			},
			closePopup() {
				this.$refs.popup.close()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.wf-box {
		overflow: hidden;
		padding-bottom: 60rpx;
		.main {
			padding: 0 30rpx;
			margin-top: 126rpx;
			
			.node-speed-wrap {
				padding: 30rpx;
				border-radius: 10rpx;
				background: #fff;
				.speed-row {
					display: flex;
					.speed-tit {
						color: #333;
						font-size: 28rpx;
					}
					.speed-im {
						position: relative;
						padding-left: 34rpx;
						margin-left: 40rpx;
						
						&:after {
							content: '';
							position: absolute;
							left: 0;
							top: 50%;
							transform: translateY(-50%);
							width: 20rpx;
							height: 20rpx;
							border-radius: 50%;
						}
						
						&.im-fast::after {
							background: #05C160;
						}
						&.im-medium::after {
							background: #FFB545;
						}
						&.im-slow::after {
							background: #FF524C;
						}
						
						&.im-nothing::after {
							background: #999;
						}
						
					}
				}
				.speed-tip {
					margin-top: 20rpx;
					color: #999;
				}
			}
			.recomm-box {
				margin-top: 30rpx;
				padding: 30rpx;
				padding-bottom: 44rpx;
				background: #fff;
				border-radius: 10rpx;
				.recomm-tit{
					color: #333333;
					font-size: 32rpx;
				}
				.recomm-scroll {
					height: 594rpx;
					.scroll-Y {
						height: 100%;
						overflow: hidden;
						.scroll-view-item {
							height: 146rpx;
							display: flex;
							align-items: center;
							border-bottom: 2rpx solid #EEEEEE;
							.recomm-status {
								image {
									width: 28rpx;
									height: 28rpx;
								}
							}
							.recomm-rt {
								margin-left: 20rpx;
								flex: 1;
								.f-row-up {
									display: flex;
									justify-content: space-between;
									view:first-child {
										color: #333;
										font-size: 28rpx;
									}
									view:last-child {
										color: $theme-color-a;
										font-size: 28rpx;
									}
								}
								.f-row-down {
									display: flex;
									justify-content: space-between;
									view {
										font-size: 20rpx;
										color: #999999;
									}
								}
							}
						}
					}
				}
			}
		
			.cut-box {
				padding: 30rpx;
				// min-height: 284rpx;
				margin-top: 30rpx;
				box-sizing: border-box;
				border-radius: 10rpx;
				background: #fff;
				.cut-tit{
					font-size: 32rpx;
					color: #333;
				}
				.cut-add {
					height: 184rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					&>view {
						display: flex;
						align-items: center;
						color: $theme-color-a;
						image {
							margin-right: 20rpx;
							width: 30rpx;
							height: 30rpx;
						}
					}
					
				}
			}
		}
	
		.popup-box {
			width: 560rpx;
			// height: 528rpx;
			padding: 0 50rpx;
			padding-top: 140rpx;
			padding-bottom: 40rpx;
			border-radius: 20rpx;
			box-sizing: border-box;
			background: #fff;
			// background: url('../../static/img/me-32.png') no-repeat;
			// background-size: 100% 100%;
			.popup-title {
				font-size: 32rpx;
				color: #333;
				font-weight: bold;
				text-align: center;
			}
			.popup-sub {
				margin-top: 36rpx;
				min-height: 146rpx;
				padding: 20rpx 30rpx;
				color: #666;
				background: #F4F4F4;
				font-size: 28rpx;
				text-align: center;
				textarea {
					text-align: left;
					font-size: 24rpx;
					width: 100%;
					height: 100%;
				}
			}
			.popup-footer {
				display: flex;
				justify-content: space-between;
				margin-top: 40rpx;
				.cancle {
					width: 200rpx;
					line-height: 76rpx;
					text-align: center;
					border: 2rpx solid #3F93FF;
					border-radius: 40rpx;
				}
				.confim {
					width: 200rpx;
					line-height: 76rpx;
					text-align: center;
					border-radius: 40rpx;
					background: #3F93FF;
					color: #fff;
				}
			}
		}
	}
</style>